@extends('admin.layout.layout')
@section("css")
    <style>
        .clock {
            font-size: 24px;
            font-weight: bold;
            animation: jump 1s infinite alternate;
        }

        @keyframes jump {
            0% {
                transform: translateY(0);
            }
            100% {
                transform: translateY(-10px);
            }
        }
    </style>
@stop
@section('title', '主页')
@section('content')</br></br>
<div>欢迎登录系统^_^，当前时间：</div>
</br>
<div id="clock" class="clock"></div>
<script>
    function updateTime() {
        var clock = document.getElementById('clock');
        var currentTime = new Date();
        var hours = currentTime.getHours();
        var minutes = currentTime.getMinutes();
        var seconds = currentTime.getSeconds();

        // 格式化时间为 HH:MM:SS
        var timeString = hours.toString().padStart(2, '0') + ':' +
            minutes.toString().padStart(2, '0') + ':' +
            seconds.toString().padStart(2, '0');

        clock.textContent = timeString;
    }

    // 每秒更新时间
    setInterval(updateTime, 1000);
</script>
@endsection

